const mongoose = require('mongoose');
let adminSchema = new mongoose.Schema({
    name:String,
    password:String
});
let Admin = mongoose.model('admin', adminSchema);
module.exports = {
    add(admin){
        return Admin.create(admin);
    },
    delete(admin){
        return Admin.remove(admin);
    },
    find(admin){
        return Admin.find(admin);
    },
    updata(admin,val){
        return Admin.update(admin,val)
    }
};